package cn.dakaqi.entities;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.Cacheable;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by chunyang on 2016/4/19.
 * 志愿者保险
 */
@Cacheable
@Entity
@Table(name = "U_VOLUNTEER_INSURANCE")
public class VolunteerInsurance extends IdEntity
{
    public static final int STATUS_UN_ACTIVATION = 0;
    public static final int STATUS_ACTIVATION = 1;

    private String volunteerCode;
    private String insuranceNo;
    private String periodStart;
    private String periodEnd;
    private String serviceProvider;
    private String serviceProviderUrl;
    private int status;
    private Date createTime;

    public VolunteerInsurance()
    {
    }

    public VolunteerInsurance(String volunteerCode, String insuranceNo) {
        this.volunteerCode = volunteerCode;
        this.insuranceNo = insuranceNo;
        this.createTime = new Date();
        this.status = VolunteerInsurance.STATUS_UN_ACTIVATION;
    }

    public String getVolunteerCode()
    {
        return volunteerCode;
    }

    public void setVolunteerCode(String volunteerCode)
    {
        this.volunteerCode = volunteerCode;
    }

    public String getInsuranceNo()
    {
        return insuranceNo;
    }

    public void setInsuranceNo(String insuranceNo)
    {
        this.insuranceNo = insuranceNo;
    }

    public String getPeriodStart()
    {
        return periodStart;
    }

    public void setPeriodStart(String periodStart)
    {
        this.periodStart = periodStart;
    }

    public String getPeriodEnd()
    {
        return periodEnd;
    }

    public void setPeriodEnd(String periodEnd)
    {
        this.periodEnd = periodEnd;
    }

    public String getServiceProvider()
    {
        return serviceProvider;
    }

    public void setServiceProvider(String serviceProvider)
    {
        this.serviceProvider = serviceProvider;
    }

    public String getServiceProviderUrl()
    {
        return serviceProviderUrl;
    }

    public void setServiceProviderUrl(String serviceProviderUrl)
    {
        this.serviceProviderUrl = serviceProviderUrl;
    }

    public int getStatus()
    {
        return status;
    }

    public void setStatus(int status)
    {
        this.status = status;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+08:00")
    public Date getCreateTime()
    {
        return createTime;
    }

    public void setCreateTime(Date createTime)
    {
        this.createTime = createTime;
    }
}
